package com.huazhi.wzsnw.mapper;

import com.huazhi.wzsnw.model.Role;
import com.huazhi.wzsnw.model.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(String tid);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(String tid);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    List<Role> selectRolesByUserTid(@Param("usertid") String usertid);

    List<Role> findPagingByListTid(@Param("listTid") List<String> stringList, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);

    List<String> selectListTidBySearch(@Param("key") String key);

    Role existsRole(@Param("rolename") String rolename);

    Role existsRoleTid(@Param("tid") String tid, @Param("rolename") String rolename);

    List<User> selectListUserByRoleTid(@Param("roletid") String roletid);

}
